<template>
	<view>
		<!-- 明细选项卡 -->
		<!-- <view class='nav'>
			<view class='item' :class='Status == 1 ? "on": ""' @click="statusClick(1)">
				<view>佣金收入</view>
			</view>
			<view class='item' :class='Status == 2 ? "on": ""' @click="statusClick(2)">
				<view>提现明细</view>
			</view>
		</view> -->
		
		<!-- 明细显示 -->
		<!-- <view class="recharge_record" v-if="Status == 1" v-for="(item,index) in commission_list" :key="index">
			<view class="record">
				<text class="num">订单号：{{item.order_sn}}</text>
				<text class="money">+{{item.money}}</text>
			</view>
			<view class="commission_bot">
				<text class="time">{{item.addtime}}</text>
				<text class="money">{{item.type}}</text>
			</view>
		</view> -->
		
		<view class="recharge_record excharge_record"  v-for="(item,index) in cursh_list" :key="index">
			<image src="https://wanchuyun-img.oss-cn-beijing.aliyuncs.com/guomai/5ddc868dbd1730a52ac1e7c27cc300a749e133d8.png" mode=""></image>
			<view class="box">
				<view class="record"> 
					<text class="num">提现</text>
					<text class="money" style="color: #333333;">-￥{{item.money}}</text>
				</view>
				<view class="commission_bot">
					<text class="time">{{item.addtime}}</text>
					<text class="money">{{item.status}}-支付宝</text>
				</view>
			</view>
		</view>
		
		
		
		<view class="no_box" v-if="cursh_list.length == 0">
			<image src="https://wanchuyun-img.oss-cn-beijing.aliyuncs.com/guomai/cc7c51ec37da95bab43ef9e42c7ff2dbff71c451.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	const app = getApp()
	export default {
		data() {
			return {
				Status: 2,
				commission_list: '',
				cursh_list: ''
			};
		},
		onLoad() {
			this.getMoneyDetail()
		},
		methods:{
			statusClick(idx){
				this.Status = idx
				this.getMoneyDetail()
			},
			// 佣金和提现明细
			getMoneyDetail(){
				let that = this;
				app.globalRequest({
					api: app.getApi().user.commssionLists,
					data:{
						type: that.Status 
					}
				}).then(res => {
					if (res.code == 1) {
						that.cursh_list = res.data
					}
				}).catch(err => {
				
				})
			},
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #fff;
	}
	
	.nav {
		width: 100%;
		border-radius: 6rpx;
		padding: 20rpx 20rpx 0;
		box-sizing: border-box;
		display: flex;
		background-color: #fff;
		justify-content: space-around;
		border-bottom: 2rpx solid #EEEEEE;
	}
	
	 .nav .item {
		text-align: center;
		font-size: 28rpx;
		color: #666666;
		width: 130rpx;
		height: 65rpx;
		line-height: 48rpx;
		background-color: #fff;
		border-radius: 30rpx;
	}
	
	.nav .item.on {
		color: #FB634F;
		position: relative;
		&::after{
			content: '';
			position: absolute;
			bottom: 0;
			left: 17%;
			width: 80rpx;
			height: 10rpx;
			border-radius: 50rpx;
			background: linear-gradient(90deg, #FF7040 0%, #FF5040 100%);
		}
	}
	
	.recharge_record{
		width: 90%;
		background-color: #fff;
		padding: 25rpx 0;
		box-sizing: border-box;
		border-bottom: 2rpx solid #EEEEEE;
		margin: auto;
		
		image{
			width: 64rpx;
			height: 64rpx;
		}
		.record{
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 15rpx;
			
			.num{
				font-size: 28rpx;
				color: #111111;
				font-weight: bold;
			}
			.money{
				color: #EC1818;
			}
			
		}
		.commission_bot{
			display: flex;
			align-items: center;
			justify-content: space-between;
			text{
				font-size: 28rpx;
				color: #999999;
			}
		}
	}
	.excharge_record{
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 0;
		.box{
			width: 85%;
		}
	}
	
	.no_box{
		width: 520rpx;
		height: 360rpx;
		margin: 400rpx auto;
		image{
			width: 100%;
			height: 100%;
		}
	}
</style>
